/*
 * Copyright (c) 2022 Kirky
 * Licensed under the Open Software Licence, Version 3.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://opensource.org/licenses/osl-3.0.php
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.lingeringdream.luciole.model.entity;

import ohos.data.orm.OrmObject;
import ohos.data.orm.annotation.Column;
import ohos.data.orm.annotation.Entity;
import ohos.data.orm.annotation.PrimaryKey;

/**
 * 用户表
 *
 * @author Kirky
 * @version 1.0
 * @date 2022/4/28
 */
@Entity(tableName = "user")
public class User extends OrmObject {

    @PrimaryKey(autoGenerate = true)
    private Integer id;

    @Column(name = "uid", notNull = true, unique = true, index = true)
    private Long uid;

    @Column(name = "unionid", notNull = true, unique = true)
    private String huaweiId;

    @Column(name = "tel", notNull = true)
    private String tel;

    @Column(name = "uname", notNull = true)
    private String uname;

    @Column(name = "password", notNull = true)
    private String password;

    @Column(name = "gender", notNull = true)
    private Boolean gender;

    @Column(name = "registration", notNull = true)
    private Long registration;

    @Column(name = "birth", notNull = true)
    private Long birth;

    @Column(name = "brief")
    private String brief;

    @Column(name = "pkey")
    private String pkey;

    @Column(name = "avatars")
    private String avatars;

    /**本地数据库更新时间*/
    @Column(name = "update", notNull = true)
    private Long update;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public String getHuaweiId() {
        return huaweiId;
    }

    public void setHuaweiId(String huaweiId) {
        this.huaweiId = huaweiId;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Boolean getGender() {
        return gender;
    }

    public void setGender(Boolean gender) {
        this.gender = gender;
    }

    public Long getRegistration() {
        return registration;
    }

    public void setRegistration(Long registration) {
        this.registration = registration;
    }

    public Long getBirth() {
        return birth;
    }

    public void setBirth(Long birth) {
        this.birth = birth;
    }

    public String getBrief() {
        return brief;
    }

    public void setBrief(String brief) {
        this.brief = brief;
    }

    public String getPkey() {
        return pkey;
    }

    public void setPkey(String pkey) {
        this.pkey = pkey;
    }

    public String getAvatars() {
        return avatars;
    }

    public void setAvatars(String avatars) {
        this.avatars = avatars;
    }

    public Long getUpdate() {
        return update;
    }

    public void setUpdate(Long update) {
        this.update = update;
    }
}
